﻿using IrisMembership.DomainClasses;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IrisMembership.ServiceLayer
{
    public interface IUserService
    {
        User FindByEmail(string email);
        Task<User> FindByEmailAsync(string email);
        User FindByUserId(int userId);
        Task<User> FindByUserIdAsync(int userId);
        AddUserStatus Add(User user);
        Task<AddUserStatus> AddAsync(User user);
        bool IsExistByUserName(string userName);
        Task<bool> IsExistByUserNameAsync(string userName);
        bool IsExistByEmail(string email);
        Task<bool> IsExistByEmailAsync(string email);
        bool ValidateUserByEmail(string email, string password);
        bool ValdiateUserByUserName(string userName, string password);
        Task<bool> ValidateUserByEmailAsync(string email, string password);
        Task<bool> ValdiateUserByUserNameAsync(string userName, string password);
        IList<User> GetUsersListByRoleId(int roleId);
        Task<IList<User>> GetUsersListByRoleIdAsync(int roleId);
        void AddRoleToUser(int userId, ICollection<Role> roles);


    }
}
